﻿package  
{
	import com.fox2d.Map2D;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	
	/**
	 * ...
	 * @author Orlando Leite
	 */
	public class MyMap extends Map2D
	{
		[Embed(source = '../lib/lib.swf', symbol = 'tile1')]
		private var tile1:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile2')]
		private var tile2:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile3')]
		private var tile3:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile4')]
		private var tile4:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile5')]
		private var tile5:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile6')]
		private var tile6:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile7')]
		private var tile7:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile8')]
		private var tile8:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile9')]
		private var tile9:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile10')]
		private var tile10:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile11')]
		private var tile11:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile12')]
		private var tile12:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile13')]
		private var tile13:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile14')]
		private var tile14:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile15')]
		private var tile15:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile16')]
		private var tile16:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile17')]
		private var tile17:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile18')]
		private var tile18:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile19')]
		private var tile19:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile20')]
		private var tile20:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile21')]
		private var tile21:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile22')]
		private var tile22:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile23')]
		private var tile23:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile24')]
		private var tile24:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile25')]
		private var tile25:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile26')]
		private var tile26:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile27')]
		private var tile27:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile28')]
		private var tile28:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile29')]
		private var tile29:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile30')]
		private var tile30:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile31')]
		private var tile31:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile32')]
		private var tile32:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile33')]
		private var tile33:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile34')]
		private var tile34:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile35')]
		private var tile35:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile36')]
		private var tile36:Class;
		
		[Embed(source = '../lib/lib.swf', symbol = 'tile37')]
		private var tile37:Class;
		
		
		public function MyMap() 
		{
			_staticGround =
			[
				[ 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 35 ],
				[ 33, 18, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 33 ],
				[ 33, 19, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 33, 21, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 33 ],
				[ 34, 01, 01, 01, 01, 01, 01, 02, 02, 02, 02, 01, 01, 01, 01, 01, 01, 01, 34 ],
				[ 24, 08, 08, 08, 08, 17, 18, 02, 02, 02, 02, 07, 09, 08, 08, 08, 08, 08, 25 ],
				[ 22, 18, 07, 07, 07, 07, 19, 02, 02, 02, 02, 06, 07, 07, 07, 07, 07, 07, 13 ],
				[ 22, 19, 06, 06, 06, 06, 20, 02, 02, 02, 02, 02, 06, 06, 06, 06, 06, 06, 13 ],
				[ 22, 21, 01, 01, 01, 02, 02, 02, 02, 02, 02, 02, 02, 02, 01, 01, 01, 02, 13 ],
				[ 22, 21, 01, 02, 02, 00, 00, 02, 02, 02, 02, 02, 00, 00, 02, 02, 01, 02, 13 ],
				[ 22, 21, 01, 02, 02, 09, 17, 21, 02, 02, 02, 02, 09, 17, 21, 02, 01, 02, 13 ],
				[ 22, 21, 02, 02, 02, 07, 07, 21, 02, 02, 02, 02, 07, 07, 21, 02, 02, 02, 13 ],
				[ 22, 21, 02, 02, 02, 06, 06, 20, 02, 02, 02, 02, 06, 06, 20, 02, 02, 02, 13 ],
				[ 22, 21, 01, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 01, 02, 13 ],
				[ 22, 21, 01, 02, 02, 00, 00, 02, 02, 02, 02, 00, 00, 02, 02, 02, 01, 02, 13 ],
				[ 23, 11, 11, 11, 11, 12, 22, 02, 02, 02, 02, 13, 23, 11, 11, 11, 11, 11, 12 ],
				[ 08, 08, 08, 08, 08, 08, 17, 26, 14, 27, 26, 09, 08, 08, 08, 08, 08, 08, 08 ]
			];
			
			_staticRoof =
			[
				[ 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 35 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 33, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 33 ],
				[ 00, 11, 11, 11, 11, 28, 27, 00, 00, 00, 00, 14, 10, 11, 11, 11, 11, 11, 00 ],
				[ 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 ],
				[ 22, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 16, 15, 00, 00, 00, 00, 00, 16, 15, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 09, 17, 00, 00, 00, 00, 00, 09, 17, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 13 ],
				[ 22, 00, 00, 00, 00, 16, 15, 00, 00, 00, 00, 16, 15, 00, 00, 00, 00, 00, 13 ],
				[ 00, 00, 00, 00, 00, 12, 22, 00, 00, 00, 00, 13, 23, 00, 00, 00, 00, 00, 00 ],
				[ 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 ]
			];
			
			_tiles =
			[
				new BitmapData( 16, 16, true, 0x0 ), Bitmap( new tile1() ).bitmapData, Bitmap( new tile2() ).bitmapData, Bitmap( new tile3() ).bitmapData, Bitmap( new tile4() ).bitmapData,
				Bitmap( new tile5() ).bitmapData, Bitmap( new tile6() ).bitmapData, Bitmap( new tile7() ).bitmapData, Bitmap( new tile8() ).bitmapData,
				Bitmap( new tile9() ).bitmapData, Bitmap( new tile10() ).bitmapData, Bitmap( new tile11() ).bitmapData, Bitmap( new tile12() ).bitmapData,
				Bitmap( new tile13() ).bitmapData, Bitmap( new tile14() ).bitmapData, Bitmap( new tile15() ).bitmapData, Bitmap( new tile16() ).bitmapData,
				Bitmap( new tile17() ).bitmapData, Bitmap( new tile18() ).bitmapData, Bitmap( new tile19() ).bitmapData, Bitmap( new tile20() ).bitmapData, 
				Bitmap( new tile21() ).bitmapData, Bitmap( new tile22() ).bitmapData, Bitmap( new tile23() ).bitmapData, Bitmap( new tile24() ).bitmapData,
				Bitmap( new tile25() ).bitmapData, Bitmap( new tile26() ).bitmapData, Bitmap( new tile27() ).bitmapData, Bitmap( new tile28() ).bitmapData,
				Bitmap( new tile29() ).bitmapData, Bitmap( new tile30() ).bitmapData, Bitmap( new tile31() ).bitmapData, Bitmap( new tile32() ).bitmapData,
				Bitmap( new tile33() ).bitmapData, Bitmap( new tile34() ).bitmapData, Bitmap( new tile35() ).bitmapData, Bitmap( new tile36() ).bitmapData,
				Bitmap( new tile37() ).bitmapData
			];
			
			
			_walk =
			[
				new BitmapData( 16, 16, true, 0x0 ), new BitmapData( 16, 16, true, 0x0 ), new BitmapData( 16, 16, true, 0x0 ), new BitmapData( 16, 16, true, 0x0 ), new BitmapData( 16, 16, true, 0x0 ),
				new BitmapData( 16, 16, true, 0x0 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ),
				new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ),
				new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ),
				new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0x0 ),
				new BitmapData( 16, 16, true, 0x0 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ),
				new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ),
				new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ),
				new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 ),
				new BitmapData( 16, 16, true, 0xFF000000 ), new BitmapData( 16, 16, true, 0xFF000000 )
			];
		}
		
	}
	
}